package bean;

import fpm.PageServiceFilter;
import frame.service.standard.MiayFilter;
import frame.service.standard.ServiceExec;
import frame.service.standard.impl.LimitReplayFilter;
import frame.service.standard.impl.LocalServiceExecutor;
import frame.service.standard.impl.SecureRequestFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 框架全局配置
 * */
@Configuration
public class Config {
    /**
     * secure服务检查，会话校验
     * */
    @Bean
    public MiayFilter secureRequestFilter(){
        return new SecureRequestFilter();
    }

    /**
     * 服务权限检查
     * */
    @Bean
    public MiayFilter pageServiceFilter(){
        return new PageServiceFilter();
    }

    /**
     * 防重放
     * */
    @Bean
    public MiayFilter limitReplay(){
        return new LimitReplayFilter();
    }

    /**
     * 服务调用方式
     * */
    @Bean
    public ServiceExec serviceRegister() {
        return new LocalServiceExecutor();
    }
}
